<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container1 {
            flex-direction: column;
            display: flex;
            justify-content: center;
            align-items: center;
            left: 0px;
            top: 0px;
            width: 454px;
            height: 454px;
            background-color: black;
            border-radius: 50%;
        }
        .box {
            color: white;
            font-size: 35px;
            text-align: center;
        }
        .img{
            width: 100px;
            height: 100px;
        }
    </style>
</head>

<body>
    <div class="container1">      
        <image class="img" src='./image/3.png'></image>
        <div class="box">
            <p>请保持静止</p>
            <p class="one">3秒后跟随训练指引</p>
            <p>进行呼气和吸气</p>
        </div>
    </div>
    <script>    
        var x = 3;  
        var one=document.getElementsByClassName('one')[0];  
        var timer = setInterval(countDown, 1000);
        var img=document.getElementsByTagName('img')[0];
        
        function countDown() {
           x--;
           
            if (x== 0) {
                location.href='training.html';
            }  else
            {
                img.src='./image/'+x+'.png';
                one.innerHTML=x+'秒后跟随训练指引';}
        }
    </script>
</body>



</html>